#ifndef NEOPROGRESSCIRCLEPRIVATE_H
#define NEOPROGRESSCIRCLEPRIVATE_H

#include "stdafx.h"
#include <QPainter>

class QPropertyAnimation;
class NeoProgressCircle;
class NeoProgressCirclePrivate : public QObject
{
    Q_OBJECT
    NEO_PRIVATE_CREATE(NeoProgressCircle)
    NEO_PROPERTY_CREATE(int, Position)
    NEO_PRIVATE_PROPERTY_CREATE_H(int, Value)
    NEO_PRIVATE_PROPERTY_CREATE_H(int, MinimumValue)
    NEO_PRIVATE_PROPERTY_CREATE_H(int, MaximumValue)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, BackgroundColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, ProgressColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QPixmap, ProgressPixmap)
    NEO_PRIVATE_PROPERTY_CREATE_H(bool, ShowText)
public:
    NeoProgressCirclePrivate(QObject *parent = nullptr);
    ~NeoProgressCirclePrivate();

    void startPositionAnimation(int position);
    void updateWidgetGeometry(QSize size);

    void drawBackground(QPainter *painter);
    void drawProgress(QPainter *painter);
    void drawText(QPainter *painter);

private:
    int pCircleRadiusGap;
    int pPixelRatio;
    QPropertyAnimation *pPositionAnimation;
};

#endif